<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace app\admin\model;

class Role extends \app\BaseModel
{
    protected $name = "role";
    protected $pk = "role_id";
    protected $schema = ["role_id" => "string", "role_name" => "string", "is_system" => "int", "description" => "string", "create_time" => "int", "uniacid" => "int", "update_time" => "int", "deleted" => "int"];
    protected $resultSetType = "array";
    public function __construct()
    {
        parent::__construct();
    }
    protected static function init()
    {
    }
    public function user()
    {
        return $this->belongsTo("AdminUser", "role_id", "role_id");
    }
    public function getRole($filter)
    {
        return $this->getRow($filter);
    }
    public function listRoleAll($filter)
    {
        return $this->listRow($filter, ["role_id", "role_name", "is_system", "description", "deleted"]);
    }
    public function createRole($data)
    {
        return $this->createRow($data);
    }
    public function updateRole($filter, $data)
    {
        return $this->updateRow($filter, $data);
    }
    public function deleteRole($filter)
    {
        return $this->deleteRow($filter);
    }
}

?>